package com.sjy.ylxt.service.impl;


import com.sjy.ylxt.entity.domain.Notification;
import com.sjy.ylxt.mapper.NotificationRepository;
import com.sjy.ylxt.service.NotificationService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NotificationServiceImpl implements NotificationService {

    @Resource
    private NotificationRepository notificationRepository;

    @Override
    public List<Notification> getAllNotifications() {
        return notificationRepository.selectList(null);
    }

    public void addNotification(Notification notification) {
        notificationRepository.insert(notification);
    }
}



